import {createRouter, createWebHashHistory} from 'vue-router'
// import HomeView from '@/views/HomeView.vue'
// import SearchView from '@/views/SearchView.vue'
// import NotFind from '@/views/NotFind.vue'

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {path: '/', redirect: '/home'},
    {path: '/home', component: ()=>import('@/views/HomeView.vue')},
    {name: 'search', path: '/search/:words?', component: ()=>import('@/views/SearchView.vue')},
    {path: '/:catchAll(.*)', component: ()=>import('@/views/NotFind.vue') } //最后一个
  ]
})

export default router